package com.java.crazy.part16.deadthread;

import com.java.crazy.base.BaseClass;

public class ClassB extends BaseClass {
    public synchronized void initB(ClassA a) {
        try {
            logi("initB: init() " + Thread.currentThread().getName() + "");
            Thread.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        logi("ClassB 准备执行: last() ");
        a.last();
    }

    public synchronized void last() {
        logi("ClassB: last() " + Thread.currentThread().getName()+ " 执行");
    }
}
